package net.sf.nwn.jme3;


import java.util.Iterator;

import com.jme3.asset.AssetManager;
import com.jme3.scene.Node;


public abstract class GeomNode extends BaseNode
{
    public GeomNode(GeomNode parent)
    {
        super(parent);
    }

    public GeomNode getSupernode()
    {
        return (GeomNode) supernode;
    }

    public abstract Node createSingleTG(AssetManager base, ShadingType metallic);

    public Node createAllTG(AssetManager base, ShadingType metallic)
    {
        Node tg = createSingleTG(base, metallic);

        Iterator<BaseNode> it = children.values().iterator();

        while (it.hasNext())
        {
            tg.attachChild(((GeomNode) it.next()).createAllTG(base, metallic));
        }
        return tg;
    }

}
